import {Flex, Tabs, List, WhiteSpace} from '@ant-design/react-native';
import Home from '~/pages/home/Home';
import React, {Component} from 'react';
import {Text, View, StyleSheet} from 'react-native';
import Item from '@ant-design/react-native/lib/list/ListItem';
import {ScrollView} from 'react-native-gesture-handler';

class ShareMoney extends Component {
    static navigationOptions = {
        title: '分享赚钱',
    };
    constructor(props) {
        super(props);
        this.state = {
            itenname: '张三11',
            itemTelephone: '13389630465',
            itemaddress: '华帝领域9栋1-4',
            itemifvehicle: '有车',
            itemnumber: '一',
            itemyesorno: '无车位',
            itemcommission: '200',
        };
    }

    render() {
        const tabs = [
            {title: '分享记录'},
            {title: '报备记录'},
            {title: '交易记录'},
            {title: '结佣'},
        ];
        const style = {
            alignItems: 'center',
            justifyContent: 'center',
            height: 150,
            backgroundColor: '#fff',
        };
        return (
            <View style={{flex: 1}}>
                {/* <Tabs style={{width: '100%'}} tabs={tabs}> */}
                    <ScrollView style={styles.scrollview}>
                        <List>
                            <Item>
                                <WhiteSpace size="sm" />
                                <Text>姓名：{this.state.itenname}</Text>
                                <WhiteSpace size="sm" />
                                <Text>电话：{this.state.itemTelephone}</Text>
                                <WhiteSpace size="sm" />
                                <Text>地址：{this.state.itemaddress}</Text>
                                <WhiteSpace size="sm" />
                                <View
                                    style={{
                                        flexDirection: 'row',
                                    }}>
                                    <Text>{this.state.itemifvehicle}、</Text>
                                    <Text>{this.state.itemnumber}辆、</Text>
                                    <Text>{this.state.itemyesorno}</Text>
                                </View>
                                <WhiteSpace size="sm" />
                                <View
                                    style={{
                                        flexDirection: 'row',
                                    }}>
                                    <Text>
                                        佣金：{this.state.itemcommission}元
                                    </Text>
                                </View>
                            </Item>
                        </List>
                    </ScrollView>
                {/* </Tabs> */}
            </View>
        );
    }
}

export const title = 'Tabs';
export const description = 'Tabs example';
export default ShareMoney;
const styles = StyleSheet.create({
    scrollview: {
        flex: 1,
    },
});
